package aiku.numericalcontroloa.Model.Entity.unitMeasure;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import java.util.Date;

@TableName(value = "unitmeasure")
@Data
public class unitMeasure {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField(value = "unitMeasure")
    private String unitMeasure;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(value = "deleted")
    @TableLogic // 标注该字段为逻辑删除
    private Integer deleted;

    /**
     * 获取创建时间戳
     * 
     * @return 创建时间戳
     */
    public Long getCreateTimeStamp() {
        return createTime.getTime();
    }

    /**
     * 获取更新时间戳
     * 
     * @return 更新时间戳
     */
    public Long getUpdateTimeStamp() {
        return createTime.getTime();
    }

}
